﻿<template>
  <div>
    <a-upload
        list-type="picture"
        action="//jsonplaceholder.typicode.com/posts/"
        :preview-file="previewFile"
    >
      <a-button> <a-icon type="upload" /> Upload </a-button>
    </a-upload>
  </div>
</template>

<script>

import { uploadVideo } from '@/services/photoList';

export default {
  name: 'VideoUpload',
  components: {
  },
  props: {},
  data() {
    return {

    };
  },
  methods: {
    async previewFile(file) {
      console.log(file)
      await uploadVideo(file).then(res => {
        console.log(res)
      }).then(({ thumbnail }) => {
        console.log(thumbnail);
      })
    },
  },
};
</script>

<style lang="less" scoped>

</style>
